package com.xxxy.jsq.dao;

import com.xxxy.jsq.model.Page;

import java.util.List;

public interface BaseDao<Class> {
	
	public String add(Class model);
	public String update(Class model);
	public String delete(Class model);
	public String deleteById(Long cid);
	public List<Class> getAllData(Class model);
	public Class findById(Long cid);
	public Class find(Class model);	
	
	/* 同名检测
	 * modle 对象
	 * flag true增加 false修改
	 */
	public boolean isSame(Class model,boolean sflag);
	public List<Class> getAllDataByPage(Class model, Page page);
	/*
	 * 获取本次查询符合条件的记录数
	 */
	public int getCount(Class model);
	/*
	 * 获取所有的名字和编号
	 */
	public List<Class> getAllky();
}
